import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/projectFile/getListPage',
    method: 'post',
    data
  })
}

export function saveData(data) {
  return request({
    url: '/projectFile/save',
    method: 'post',
    data
  })
}

export function editData(data) {
  return request({
    url: '/projectFile/edit',
    method: 'post',
    data
  })
}

export function remove(data) {
  return request({
    url: '/projectFile/delete',
    method: 'post',
    params: data
  })
}

export function getInfo(data) {
  return request({
    url: '/projectFile/getInfo',
    method: 'get',
    params: data
  })
}

export function getFileInfo(data) {
  return request({
    url: '/projectFile/getFileInfo',
    method: 'get',
    params: data
  })
}

export function getHistory(data) {
  return request({
    url: '/projectFile/getHistory',
    method: 'get',
    params: data
  })
}

export function getFileList(data) {
  return request({
    url: '/projectFile/getFileList',
    method: 'get',
    params: data
  })
}

export function getSPListPage(data) {
  return request({
    url: '/projectFile/getSPListPage',
    method: 'post',
    data
  })
}

export function downloadFile(paran) {
  return request({
    url: '/projectFile/downLoad',
    method: 'post',
    params: paran,
    responseType: 'blob'
  })
}

export function upload(data) {
  return request({
    url: '/projectFile/upload',
    method: 'post',
    data
  })
}

export function saveRecords(paran) {
  return request({
    url: '/projectFileRecords/save',
    method: 'post',
    params: paran
  })
}

export function getRecords(paran) {
  return request({
    url: '/projectFile/getRecords',
    method: 'post',
    params: paran
  })
}

export function checkUploadFile(paran) {
  return request({
    url: '/projectFile/checkUploadFile',
    method: 'post',
    params: paran
  })
}

export function newSave(data) {
  return request({
    url: '/projectFile/newSave',
    method: 'post',
    data
  })
}
